<template>
  <div class="content">
    <div class="header">
      <span>今日出工人数</span>
      <a href="" class="more">更多</a>
    </div>
    <div class="num">{{ detailData.attendanceToday }}</div>
    <div class="body">
      <div class="left">
        <span>周同比</span>
        <img class="icon" src="../../../assets/images/green_up.png" alt="">
        <span>{{ detailData.week+'%' }}</span>
      </div>
      <div class="right">
        <span>日环比</span>
        <img class="icon" src="../../../assets/images/orange_down.png" alt="">
        <span>{{ detailData.day+'%' }}</span>
      </div>
    </div>
    <!-- <div class="footer">
      <span>日均出工数</span>
      <span class="num ml-10">{{ detailData.attendanceToday }}</span>
    </div> -->
  </div>
</template>

<script>
import { summaryData } from '@/api/autonym'

export default {
  data() {
    return {
      detailData: {}
    }
  },
  created() {},
  mounted() {
    this.getDetail()
  },
  methods: {
    async getDetail() {
      const res = await summaryData(this.listQuery)
      if (res.code === 200) {
        if (res.data) {
          this.detailData = res.data
        }
      }
    }
  }
}
</script>

<style scoped lang="scss">
.content {
  height:172px;
  padding: 16px;
  border-radius: 2px;
  border: 1px solid rgba(221, 221, 221, 0.2);
  .header {
    margin-bottom: 10px;
    .more {
      float: right;
      color: rgba(247, 181, 0, 1);
    }
  }
  .num {
    font-size: 16px;
    color: #ffffff;
  }
  .body {
    display: flex;
    margin-top: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(221, 221, 221, 0.2);
    .icon {
      margin-left: 15px;
      width: 16px;
      height: 16px;
    }
    .left {
      display: flex;
      align-items: center;
      justify-content: flex-start;
      flex: 1;
    }
    .right {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      flex: 1;
    }
  }
  .footer {
    margin-top: 15px;
    .num {
      font-size: 14px;
    }
    .ml-10 {
      margin-left: 10px;
    }
  }
}
</style>
